<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
<?
	if (sizeof($basket['basket']) > 0) {
		?>
		<table cellspacing='0' cellpadding='0' class='basket_table'>
			<tr>
				<th>#</th>
				<th>Название</th>
				<th>Количество</th>
				<th>Цена</th>
				<th>Сумма</th>
				<? if (!$return) { ?>
					<th></th>
				<? } ?>
			</tr>
		<?
		$i = 0;
		foreach ($basket['basket'] as $key => $item) {
			$item_link = $this->catalog_service_model->get_item_link($key);
			$image = $this->db->select()->from('catalog_images')->where('photo_item', $key)->where('photo_main', '1')->get()->row_array();
			$i++;
			echo "<tr>";
				echo "<td style='width: 30px;'>";
					echo $i;
				echo "</td>";
				echo "<td>";
					echo "<div><a href='".$item_link."' ".(sizeof($image) > 0?"rel='".$key.":".$image['photo_file']."'":"")." class='can_preview_item'>".$item['name']."</a></div>";
				echo "</td>";
				echo "<td style='text-align: center; width: 60px;'>";
					echo $item['count'];
				echo "</td>";
				echo "<td style='width: 100px;'>";
					echo "<span>".tonum($item['price'])." руб.</span>";
				echo "</td>";
				echo "<td style='width: 100px;'>";
					echo "<span>".tonum($item['sum'])." руб.</span>";
				echo "</td>";
			echo "</tr>";

		}
		?>
		</table>
		<span class='fr' style='font-size: 18px;'>Общая сумма: <?=tonum(($order['order_payment'] == "prepaid")?$order['order_sum2']:$order['order_sum'])?> рублей</span>
		<br class="cc" />
		<?
	} else {
		echo showmenotice('Список пуст');
	}
?>